import { createStore } from 'vuex';
import mutations from './mutations';
import storage from './../utils/storage';

let state = {
  // 用户信息
  userInfo: storage.getItem('userInfo', {}),
  // 当前用户可以访问的菜单
  menuList: storage.getItem('menuList', []),
  // 当前用户可以访问的按钮
  actionList: storage.getItem('actionList', []),
  // 通知数量
  noticeCount: 0,
};

export default createStore({ state, mutations });
